const http = require("http")
const server = http.createServer()
server.on("request", (req,res)=>{
const url=req.url
const method = req.method
const str = `对方请求地址是：${url},对方的请求类型是：${method}`
console.log(str)

res.setHeader("Content-Type","text/html; charset=utf-8")
res.end(str)

})
server.listen(8080,()=>{

})